
// layout
// import Footer from '@/layout/footer/index.vue'
// import Header from '@/layout/header/index.vue'
import MidRouterView from '@/components/MidRouterView.vue'
// #region 自动导入模块路由
const files = require.context('./modules', false, /\.js$/)
const modules = []

files.keys().forEach((key) => {
  modules.push(files(key).default || files(key))
})
// #endregion

const routes = [
  {
    path: '/applicationcode',
    redirect: '/applicationcode/index',
    component: MidRouterView,
    children: [
      {
        path: 'index',
        name: 'Applicationcode',
        meta: {
          title: '隔离点人员管理'
        },
        component: () => import('@/views/applicationcode/index.vue')
      }

    ]
  },
  // {
  //   path: "/",
  //   redirect: "/applicationcode",
  //   component: Header,
  //   children: [
  //     {
  //       path: "/applicationcode",
  //       name: "Applicationcode",
  //       meta: {
  //         title: "开通渝快码",
  //       },
  //       component: () => import("@/views/applicationcode/index.vue"),
  //     },
  //   ],
  // },

  {
    path: '/code',
    redirect: '/code/index',
    component: MidRouterView,
    children: [
      {
        path: 'index',
        name: 'ShowCode',
        meta: {
          title: '采集隔离人员信息'
        },
        component: () => import('@/views/showcode/index.vue')
      }

    ]
  },

  {
    path: '/location',
    redirect: '/location/index',
    component: MidRouterView,
    children: [
      {
        path: 'index',
        name: 'Location',
        meta: {
          title: '应用场所'
        },
        component: () => import('@/views/personcenter/index.vue')
      }

    ]
  },
  {
    path: '/dataStatistics',
    redirect: '/dataStatistics/index',
    component: MidRouterView,
    children: [{
      path: 'index',
      name: 'DataStatistics',
      meta: {
        title: '数据统计'
      },
      component: () => import('@/views/dataStatistics/index.vue')
    }]
  },
  {
    path: '/source',
    redirect: '/source/index',
    component: MidRouterView,
    children: [
      {
        path: 'index',
        name: 'Source',
        meta: {
          title: '数据源'
        },
        component: () => import('@/views/datasource/index.vue')
      }

    ]
  },
  {
    path: '/',
    redirect: '/chiooceDistance',
    component: MidRouterView,
    children: [
      {
        path: 'chiooceDistance',
        name: 'ChiooceDistance',
        meta: {
          title: '隔离站点'
        },
        component: () => import('@/views/chiooceDistance/index.vue')
      }

    ]
  }
]

export default routes
